<?php
	defined('_JEXEC') or die('Restricted access');
	require_once(CUTEENGINE_BASE_ACTION_PATH."base_action_class.php");
    require_once(CUTEENGINE_BASE_STEP_PATH."base_step_class.php");
	//
    // t_action_get_parameters
    //
	class t_action_get_parameters extends t_base_action
	{
        // property declaration
		// protected        
		// G
		const language_position_last = 1;
		
		// property declaration
		// public
		// P
		public $parameter = null;
        const proper_properties_position_component_pos = 0;
		const proper_properties_position_last = 1;
        // R
        const required_fields_count = 0;
      
        // method declaration
    	// protected
        // G
		static function get_help_proper_property($a_index)
		{
			$local_return = 'NO HELP AVAILABLE';
			/*switch ($a_index) 
            {
                case self::proper_properties_position_:
					$local_return = '';
				break;                
			}*/
			return $local_return;
		}
        static function get_default_proper_property($a_index)
		{
			$local_return = '';
			//echo "a_index: $a_index<br>";
			/*switch ($a_index) 
            {
				case self::proper_properties_position_per_:
					$local_return = '';
				break;				
			}*/
			return $local_return;
		}		
        protected function get_proper_properties_position_last()
        {
            return self::proper_properties_position_last;
        }
		protected function get_required_fields_count()
        {
            return self::required_fields_count;
        }
        

		// I
        protected function initialize_action()
        {		
			if (! $this->initialized)
			{
                parent::initialize_action();
				
				

			}
			return $this->initialized;
		}		
        protected function initialize_step_execution()
        {		
			
			$local_step = $this->steps_list[$this->current_step_index];
			$local_step->initialize();
			$this->custom_execute_step($local_step);                                             
		}	
        protected function custom_execute_step($a_step)        
        {	
			global $g_url_parameters_namespace;
			$local_class = get_class($a_step);
			switch ($local_class) 
            {
				/*********** t_step_ajax_get ***********/
				case t_step_ajax_get:
					//echo 'this->proper_properties_array[self::proper_properties_position_component_pos]: '.$this->proper_properties_array[self::proper_properties_position_component_pos]."<br>";
					$this->parameter = $g_url_parameters_namespace->get_parameter_by_position(
						$this->proper_properties_array[self::proper_properties_position_component_pos]);
					
				break;
			}	
        }
        // method declaration
    	// public
        public function __construct($a_parent_component,$a_parent_part,$a_common_properties_str, $a_proper_properties_str) 
		{
			parent::__construct($a_parent_component,$a_parent_part,$a_common_properties_str, $a_proper_properties_str);
			$this->steps_list[t_base_action::step_start] = t_base_step::create_step_from_string('|t_step_ajax_get|'.$this->get_action_name().'_start||'); 

			
		}
        // D
		public function do_action_from_ajax()
        {
			global $g_strings_utility_namespace;
			global $g_ambient_namespace;
			//$local_result = new t_content_loader_result;
			$local_parameter = parent::do_action_from_ajax();
        }
		//G
		public function get_language_position_last()
        {
            return self::language_position_last;
        }
    }
?>    